Skip to content

Conversation

iodeslykos
Copy link
Contributor

@iodeslykos iodeslykos commented Apr 9, 2025

Description

Add explicit IAM policy version ("2012-10-17") to SQS policy in notification module to avoid API timeout during apply when modifying the resource. Very simple change to add what is already a default for the resource.

Solution discovered in documentation while attempting to troubleshoot the issue (big ol' warning under the resource overview): Resource: aws_sqs_queue

Error:

╷
│ Error: waiting for SQS Queue (https://sqs.us-west-2.amazonaws.com/<redacted>) attribute (Policy) create: timeout while waiting for state to become 'equal' (last state: 'notequal', timeout: 19m59.970811759s)
│ 
│   with module.ingest_bucket_notifications["cloudflare"].aws_sqs_queue_policy.allow["<redacted>"],
│   on .terraform/modules/ingest_bucket_notifications/modules/notification/main.tf line 108, in resource "aws_sqs_queue_policy" "allow":
│  108: resource "aws_sqs_queue_policy" "allow" {
│ 
╵

Motivation and Context

Without the version explicitly stated, modifications to the SQS policy cause timeout during apply.

Breaking Changes

No breaking changes experienced. Explicitly setting what is already default.

How Has This Been Tested?

  • I have updated at least one of the examples/* to demonstrate and validate my change(s)
    ^^^ (WAS NOT NECESSARY)
  • I have tested and validated these changes using one or more of the provided examples/* projects
  • I have executed pre-commit run -a on my pull request

@antonbabenko antonbabenko changed the title fix(notification): Timeout if SQS policy created without explicit version fix: Timeout if SQS policy created without explicit version in notification module Apr 10, 2025
@antonbabenko antonbabenko merged commit 1b1ca55 into terraform-aws-modules:master Apr 10, 2025
19 checks passed
antonbabenko pushed a commit that referenced this pull request Apr 10, 2025
## [4.6.1](v4.6.0...v4.6.1) (2025-04-10)

### Bug Fixes

* Timeout if SQS policy created without explicit version in notification module ([#321](#321)) ([1b1ca55](1b1ca55))
@antonbabenko
Copy link
Member

This PR is included in version 4.6.1 🎉

Copy link

I'm going to lock this pull request because it has been closed for 30 days ⏳. This helps our maintainers find and focus on the active issues. If you have found a problem that seems related to this change, please open a new issue and complete the issue template so we can capture all the details necessary to investigate further.

@github-actions github-actions bot locked as resolved and limited conversation to collaborators May 11, 2025
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants